<template>
  <div class="app-container">
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
      <el-form-item label="关联告警" prop="alarmId">
        <el-select
          v-model="queryParams.alarmId"
          placeholder="请选择告警"
          clearable
          filterable
          style="width: 200px"
        >
          <el-option
            v-for="item in alarmOptions"
            :key="item.alarmId"
            :label="`#${item.alarmId} - ${item.alarmTitle}`"
            :value="item.alarmId"
          />
        </el-select>
      </el-form-item>
      <el-form-item label="处理动作" prop="handleAction">
        <el-select
          v-model="queryParams.handleAction"
          placeholder="请选择动作"
          clearable
          style="width: 120px"
        >
          <el-option label="确认" value="confirm" />
          <el-option label="忽略" value="ignore" />
          <el-option label="解决" value="resolve" />
          <el-option label="升级" value="escalate" />
        </el-select>
      </el-form-item>
      <el-form-item label="处理人" prop="handlePerson">
        <el-input
          v-model="queryParams.handlePerson"
          placeholder="请输入处理人"
          clearable
          style="width: 140px"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="跟进状态" prop="followUpRequired">
        <el-select
          v-model="queryParams.followUpRequired"
          placeholder="跟进状态"
          clearable
          style="width: 120px"
        >
          <el-option label="需要跟进" value="1" />
          <el-option label="无需跟进" value="0" />
        </el-select>
      </el-form-item>
      <el-form-item label="处理时间" prop="handleTimeRange">
        <el-date-picker
          v-model="queryParams.handleTimeRange"
          type="datetimerange"
          range-separator="至"
          start-placeholder="开始时间"
          end-placeholder="结束时间"
          value-format="yyyy-MM-dd HH:mm:ss"
          style="width: 360px"
        />
      </el-form-item>
      <el-form-item>
        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
      </el-form-item>
    </el-form>

    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button
          type="primary"
          plain
          icon="el-icon-plus"
          size="mini"
          @click="handleAdd"
          v-hasPermi="['system:alarmHandleLog:add']"
        >新增</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="success"
          plain
          icon="el-icon-edit"
          size="mini"
          :disabled="single"
          @click="handleUpdate"
          v-hasPermi="['system:alarmHandleLog:edit']"
        >修改</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="danger"
          plain
          icon="el-icon-delete"
          size="mini"
          :disabled="multiple"
          @click="handleDelete"
          v-hasPermi="['system:alarmHandleLog:remove']"
        >删除</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="warning"
          plain
          icon="el-icon-download"
          size="mini"
          @click="handleExport"
          v-hasPermi="['system:alarmHandleLog:export']"
        >导出</el-button>
      </el-col>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>

    <el-table 
      v-loading="loading" 
      :data="alarmHandleLogList" 
      @selection-change="handleSelectionChange"
      stripe
      border
      highlight-current-row
      class="common-table"
    >
      <el-table-column type="selection" width="50" align="center" />
      <el-table-column label="ID" align="center" prop="handleId" width="80" />
      <el-table-column label="关联告警" align="center" prop="alarmId" width="180">
        <template slot-scope="scope">
          <div>
            <div style="font-weight: 500; color: #409EFF;">{{ getAlarmTitle(scope.row.alarmId) }}</div>
            <div style="font-size: 12px; color: #909399;">#{{ scope.row.alarmId }}</div>
          </div>
        </template>
      </el-table-column>
      <el-table-column label="处理动作" align="center" prop="handleAction" width="100">
        <template slot-scope="scope">
          <el-tag :type="getActionTagType(scope.row.handleAction)" size="mini">
            {{ getActionLabel(scope.row.handleAction) }}
          </el-tag>
        </template>
      </el-table-column>
      <el-table-column label="处理人" align="center" prop="handlePerson" width="120" />
      <el-table-column label="处理概要" align="left" min-width="200">
        <template slot-scope="scope">
          <div>
            <div style="font-weight: 500; margin-bottom: 4px;" v-if="scope.row.handleContent">
              处理内容：<span style="color: #606266;">{{ getShortText(scope.row.handleContent, 50) }}</span>
            </div>
            <div style="font-size: 12px; color: #67C23A;" v-if="scope.row.handleResult">
              处理结果：{{ getShortText(scope.row.handleResult, 50) }}
            </div>
          </div>
        </template>
      </el-table-column>
      <el-table-column label="处理时间" align="center" prop="handleTime" width="140">
        <template slot-scope="scope">
          <div>
            <div style="font-size: 12px;">{{ parseTime(scope.row.handleTime, '{y}-{m}-{d}') }}</div>
            <div style="font-size: 11px; color: #909399;">{{ parseTime(scope.row.handleTime, '{h}:{i}:{s}') }}</div>
          </div>
        </template>
      </el-table-column>
      <el-table-column label="跟进状态" align="center" width="120">
        <template slot-scope="scope">
          <div>
            <el-switch
              v-model="scope.row.followUpRequired"
              active-value="1"
              inactive-value="0"
              active-text="需跟进"
              inactive-text="无需跟进"
              disabled
              style="margin-bottom: 4px;"
            />
            <div v-if="scope.row.followUpRequired === '1' && scope.row.followUpDeadline" style="font-size: 11px;">
              <span :style="{ color: getDeadlineColor(scope.row.followUpDeadline) }">
                {{ formatDeadline(scope.row.followUpDeadline) }}
              </span>
            </div>
          </div>
        </template>
      </el-table-column>
      <el-table-column label="操作" align="center" width="120" class-name="small-padding fixed-width">
        <template slot-scope="scope">
          <el-button
            size="mini"
            type="text"
            icon="el-icon-edit"
            @click="handleUpdate(scope.row)"
            v-hasPermi="['system:alarmHandleLog:edit']"
          >修改</el-button>
          <el-button
            size="mini"
            type="text"
            icon="el-icon-delete"
            @click="handleDelete(scope.row)"
            v-hasPermi="['system:alarmHandleLog:remove']"
            style="color: #F56C6C"
          >删除</el-button>
        </template>
      </el-table-column>
    </el-table>
    
    <pagination
      v-show="total>0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />

    <!-- 添加或修改告警处理记录对话框 -->
    <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
      <el-form ref="form" :model="form" :rules="rules" label-width="90px">
        <el-tabs v-model="activeTab" type="border-card">
          <el-tab-pane label="基本信息" name="basic">
            <el-row :gutter="20">
              <el-col :span="12">
                <el-form-item label="关联告警" prop="alarmId">
                  <el-select v-model="form.alarmId" placeholder="请选择告警" filterable style="width: 100%">
                    <el-option
                      v-for="item in alarmOptions"
                      :key="item.alarmId"
                      :label="`#${item.alarmId} - ${item.alarmTitle}`"
                      :value="item.alarmId"
                    />
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="处理动作" prop="handleAction">
                  <el-select v-model="form.handleAction" placeholder="请选择处理动作" style="width: 100%">
                    <el-option label="确认" value="confirm">
                      <span style="color: #E6A23C">确认 - 确认告警并开始处理</span>
                    </el-option>
                    <el-option label="忽略" value="ignore">
                      <span style="color: #909399">忽略 - 忽略此告警</span>
                    </el-option>
                    <el-option label="解决" value="resolve">
                      <span style="color: #67C23A">解决 - 问题已解决</span>
                    </el-option>
                    <el-option label="升级" value="escalate">
                      <span style="color: #F56C6C">升级 - 上报上级处理</span>
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="处理人" prop="handlePerson">
                  <el-input v-model="form.handlePerson" placeholder="请输入处理人" />
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="处理时间" prop="handleTime">
                  <el-date-picker 
                    v-model="form.handleTime"
                    type="datetime"
                    value-format="yyyy-MM-dd HH:mm:ss"
                    placeholder="请选择处理时间"
                    style="width: 100%"
                  />
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="告警预览" v-if="form.alarmId">
                  <el-card shadow="never" style="border: 1px dashed #dcdfe6;">
                    <div style="padding: 10px 0;">
                      <div style="font-weight: 500; margin-bottom: 5px;">{{ getAlarmTitle(form.alarmId) }}</div>
                      <div style="font-size: 12px; color: #909399;">告警ID: #{{ form.alarmId }}</div>
                    </div>
                  </el-card>
                </el-form-item>
              </el-col>
            </el-row>
          </el-tab-pane>
          <el-tab-pane label="处理详情" name="content">
            <el-row :gutter="20">
              <el-col :span="24">
                <el-form-item label="处理内容">
                  <el-input 
                    v-model="form.handleContent" 
                    type="textarea" 
                    placeholder="请详细描述处理过程、采取的措施等"
                    :rows="6"
                    maxlength="1000"
                    show-word-limit
                  />
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="处理结果">
                  <el-input 
                    v-model="form.handleResult" 
                    type="textarea" 
                    placeholder="请描述处理结果、效果评估等"
                    :rows="4"
                    maxlength="500"
                    show-word-limit
                  />
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-alert
                  title="填写提示"
                  type="info"
                  description="处理内容：记录具体的处理步骤和采取的措施；处理结果：记录处理后的效果和最终状态。"
                  :closable="false"
                  show-icon>
                </el-alert>
              </el-col>
            </el-row>
          </el-tab-pane>
          <el-tab-pane label="跟进管理" name="followup">
            <el-row :gutter="20">
              <el-col :span="24">
                <el-form-item label="是否需要跟进">
                  <el-switch
                    v-model="form.followUpRequired"
                    active-value="1"
                    inactive-value="0"
                    active-text="需要跟进"
                    inactive-text="无需跟进"
                    style="margin-bottom: 20px;"
                  />
                </el-form-item>
              </el-col>
              <el-col :span="24" v-if="form.followUpRequired === '1'">
                <el-form-item label="跟进截止时间" prop="followUpDeadline">
                  <el-date-picker 
                    v-model="form.followUpDeadline"
                    type="datetime"
                    value-format="yyyy-MM-dd HH:mm:ss"
                    placeholder="请选择跟进截止时间"
                    style="width: 100%"
                  />
                </el-form-item>
              </el-col>
              <el-col :span="24" v-if="form.followUpRequired === '1'">
                <el-alert
                  title="跟进提醒"
                  type="warning"
                  description="设置跟进时间后，系统将在截止时间前发送提醒通知。请确保跟进时间设置合理。"
                  :closable="false"
                  show-icon>
                </el-alert>
              </el-col>
              <el-col :span="24" v-if="form.followUpDeadline">
                <el-form-item label="跟进预览">
                  <el-card shadow="never" style="border: 1px dashed #dcdfe6;">
                    <div style="padding: 10px 0;">
                      <div style="font-weight: 500; margin-bottom: 5px;">跟进截止时间</div>
                      <div :style="{ color: getDeadlineColor(form.followUpDeadline) }">
                        {{ formatDeadline(form.followUpDeadline) }}
                      </div>
                    </div>
                  </el-card>
                </el-form-item>
              </el-col>
            </el-row>
          </el-tab-pane>
        </el-tabs>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import { listAlarmHandleLog, getAlarmHandleLog, delAlarmHandleLog, addAlarmHandleLog, updateAlarmHandleLog } from "@/api/system/alarmHandleLog";

export default {
  name: "AlarmHandleLog",
  data() {
    return {
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 告警处理记录表格数据
      alarmHandleLogList: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 当前活跃标签
      activeTab: "basic",
      // 告警选项
      alarmOptions: [],
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        alarmId: null,
        handleAction: null,
        handlePerson: null,
        followUpRequired: null,
        handleTimeRange: null,
      },
      // 表单参数
      form: {},
      // 表单校验
      rules: {
        alarmId: [
          { required: true, message: "关联告警不能为空", trigger: "change" }
        ],
        handleAction: [
          { required: true, message: "处理动作不能为空", trigger: "change" }
        ],
        handlePerson: [
          { required: true, message: "处理人不能为空", trigger: "blur" }
        ],
        handleTime: [
          { required: true, message: "处理时间不能为空", trigger: "blur" }
        ],
      }
    };
  },
  created() {
    this.getList();
    this.getAlarmOptions();
  },
  methods: {
    /** 查询告警处理记录列表 */
    getList() {
      this.loading = true;
      // 处理日期范围查询
      if (this.queryParams.handleTimeRange && this.queryParams.handleTimeRange.length === 2) {
        this.queryParams.handleTimeStart = this.queryParams.handleTimeRange[0];
        this.queryParams.handleTimeEnd = this.queryParams.handleTimeRange[1];
      } else {
        this.queryParams.handleTimeStart = null;
        this.queryParams.handleTimeEnd = null;
      }
      
      listAlarmHandleLog(this.queryParams).then(response => {
        this.alarmHandleLogList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    /** 获取告警选项 */
    getAlarmOptions() {
      // 这里应该调用告警API，暂时使用mock数据
      this.alarmOptions = [
        { alarmId: 20000, alarmTitle: '设备离线告警' },
        { alarmId: 20001, alarmTitle: '溶氧量不足告警' },
        { alarmId: 20002, alarmTitle: '设备温度过高告警' },
        { alarmId: 20003, alarmTitle: 'pH值异常告警' },
        { alarmId: 20004, alarmTitle: '信号强度弱告警' },
        { alarmId: 20005, alarmTitle: '检测精度下降告警' },
        { alarmId: 20006, alarmTitle: '系统CPU负载告警' },
        { alarmId: 20007, alarmTitle: '内存使用率告警' },
        { alarmId: 20008, alarmTitle: '水产养殖效益告警' },
        { alarmId: 20009, alarmTitle: 'AI模型性能告警' }
      ];
    },
    /** 获取告警标题 */
    getAlarmTitle(alarmId) {
      const alarm = this.alarmOptions.find(item => item.alarmId === alarmId);
      return alarm ? alarm.alarmTitle : '未知告警';
    },
    /** 获取处理动作标签 */
    getActionLabel(action) {
      const actionMap = {
        'confirm': '确认',
        'ignore': '忽略',
        'resolve': '解决',
        'escalate': '升级'
      };
      return actionMap[action] || action;
    },
    /** 获取处理动作标签类型 */
    getActionTagType(action) {
      const actionMap = {
        'confirm': 'warning',
        'ignore': 'info',
        'resolve': 'success',
        'escalate': 'danger'
      };
      return actionMap[action] || '';
    },
    /** 获取截取文本 */
    getShortText(text, length = 50) {
      if (!text) return '';
      return text.length > length ? text.substring(0, length) + '...' : text;
    },
    /** 获取跟进截止时间颜色 */
    getDeadlineColor(deadline) {
      if (!deadline) return '#909399';
      const now = new Date();
      const deadlineTime = new Date(deadline);
      const timeDiff = deadlineTime.getTime() - now.getTime();
      const daysDiff = Math.ceil(timeDiff / (1000 * 3600 * 24));
      
      if (daysDiff < 0) return '#F56C6C'; // 已过期，红色
      if (daysDiff <= 1) return '#E6A23C'; // 1天内，橙色
      if (daysDiff <= 3) return '#409EFF'; // 3天内，蓝色
      return '#67C23A'; // 充足时间，绿色
    },
    /** 格式化跟进截止时间 */
    formatDeadline(deadline) {
      if (!deadline) return '';
      const now = new Date();
      const deadlineTime = new Date(deadline);
      const timeDiff = deadlineTime.getTime() - now.getTime();
      const daysDiff = Math.ceil(timeDiff / (1000 * 3600 * 24));
      
      const dateStr = this.parseTime(deadline, '{y}-{m}-{d} {h}:{i}');
      
      if (daysDiff < 0) {
        return `${dateStr} (已过期${Math.abs(daysDiff)}天)`;
      } else if (daysDiff === 0) {
        return `${dateStr} (今天截止)`;
      } else if (daysDiff === 1) {
        return `${dateStr} (明天截止)`;
      } else {
        return `${dateStr} (还有${daysDiff}天)`;
      }
    },
    // 取消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // 表单重置
    reset() {
      this.form = {
        handleId: null,
        alarmId: null,
        handleAction: null,
        handlePerson: null,
        handleContent: null,
        handleResult: null,
        handleTime: null,
        followUpRequired: '0',
        followUpDeadline: null
      };
      this.activeTab = "basic";
      this.resetForm("form");
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.handleId)
      this.single = selection.length!==1
      this.multiple = !selection.length
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      this.open = true;
      this.title = "添加处理记录";
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.reset();
      const handleId = row.handleId || this.ids
      getAlarmHandleLog(handleId).then(response => {
        this.form = response.data;
        this.open = true;
        this.title = "修改处理记录";
      });
    },
    /** 提交按钮 */
    submitForm() {
      this.$refs["form"].validate(valid => {
        if (valid) {
          if (this.form.handleId != null) {
            updateAlarmHandleLog(this.form).then(response => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            addAlarmHandleLog(this.form).then(response => {
              this.$modal.msgSuccess("新增成功");
              this.open = false;
              this.getList();
            });
          }
        }
      });
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      const handleIds = row.handleId || this.ids;
      const alarmTitle = row.alarmId ? this.getAlarmTitle(row.alarmId) : '选中的处理记录';
      this.$modal.confirm('是否确认删除"' + alarmTitle + '"的处理记录？').then(function() {
        return delAlarmHandleLog(handleIds);
      }).then(() => {
        this.getList();
        this.$modal.msgSuccess("删除成功");
      }).catch(() => {});
    },
    /** 导出按钮操作 */
    handleExport() {
      this.download('system/alarmHandleLog/export', {
        ...this.queryParams
      }, `alarmHandleLog_${new Date().getTime()}.xlsx`)
    }
  }
};
</script>

<style scoped>
.common-table {
  margin-top: 10px;
}

.common-table .el-table__header th {
  background-color: #fafafa;
  color: #606266;
  font-weight: 500;
}

.el-tag {
  font-weight: 500;
}

.dialog-footer {
  text-align: right;
  padding-top: 20px;
}

.el-form .el-form-item__label {
  font-weight: 500;
  color: #606266;
}

.el-select .el-input__inner {
  cursor: pointer;
}

/* 搜索表单优化 */
.el-form--inline .el-form-item {
  margin-bottom: 10px;
}

/* 表格操作按钮间距 */
.el-table .cell .el-button + .el-button {
  margin-left: 5px;
}

/* 标签页优化 */
.el-tabs--border-card .el-tab-pane {
  padding: 20px;
}

.el-tabs--border-card .el-tabs__content {
  background-color: #fff;
}

/* 弹窗宽度响应式 */
@media (max-width: 768px) {
  .el-dialog {
    width: 95% !important;
  }
}

/* 表格列头样式优化 */
.el-table th.is-leaf {
  border-bottom: 1px solid #EBEEF5;
}

/* 处理动作标签样式优化 */
.el-tag.el-tag--success {
  border-color: #67C23A;
}

.el-tag.el-tag--warning {
  border-color: #E6A23C;
}

.el-tag.el-tag--danger {
  border-color: #F56C6C;
}

.el-tag.el-tag--info {
  border-color: #909399;
}

/* 告警信息显示优化 */
.alarm-info {
  text-align: center;
}

.alarm-info .alarm-title {
  font-weight: 500;
  color: #409EFF;
  margin-bottom: 2px;
}

.alarm-info .alarm-id {
  font-size: 12px;
  color: #909399;
}

/* 处理概要显示优化 */
.handle-summary {
  text-align: left;
}

.handle-summary .content {
  font-weight: 500;
  margin-bottom: 4px;
  color: #606266;
}

.handle-summary .result {
  font-size: 12px;
  color: #67C23A;
}

/* 处理时间显示优化 */
.handle-time {
  text-align: center;
}

.handle-time .date {
  font-size: 12px;
  font-weight: 500;
}

.handle-time .time {
  font-size: 11px;
  color: #909399;
}

/* 跟进状态显示优化 */
.followup-status {
  text-align: center;
}

.followup-status .el-switch {
  margin-bottom: 4px;
}

.followup-status .deadline {
  font-size: 11px;
}

/* 跟进截止时间状态颜色 */
.deadline-expired {
  color: #F56C6C;
}

.deadline-urgent {
  color: #E6A23C;
}

.deadline-normal {
  color: #409EFF;
}

.deadline-safe {
  color: #67C23A;
}

/* 开关组件优化 */
.el-switch {
  margin-bottom: 5px;
}

.el-switch__label {
  font-size: 12px;
}

/* 预览卡片样式 */
.preview-card {
  border: 1px dashed #dcdfe6;
  border-radius: 4px;
  padding: 10px;
  background-color: #fafafa;
}

.preview-card .preview-title {
  font-weight: 500;
  margin-bottom: 5px;
  color: #606266;
}

.preview-card .preview-content {
  font-size: 12px;
  color: #909399;
}

/* 文本域优化 */
.el-textarea .el-textarea__inner {
  resize: vertical;
}

/* 告警预览卡片 */
.alarm-preview {
  border: 1px dashed #dcdfe6;
  border-radius: 4px;
  padding: 10px 0;
  background-color: #f8f9fa;
}

.alarm-preview .title {
  font-weight: 500;
  margin-bottom: 5px;
  color: #409EFF;
}

.alarm-preview .id {
  font-size: 12px;
  color: #909399;
}

/* 跟进预览卡片 */
.followup-preview {
  border: 1px dashed #dcdfe6;
  border-radius: 4px;
  padding: 10px 0;
  background-color: #f8f9fa;
}

.followup-preview .title {
  font-weight: 500;
  margin-bottom: 5px;
  color: #606266;
}

/* 处理动作选项样式 */
.action-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.action-option .action-name {
  font-weight: 500;
}

.action-option .action-desc {
  font-size: 12px;
  color: #909399;
}

/* 告警选项样式 */
.alarm-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.alarm-option .alarm-title {
  font-weight: 500;
}

.alarm-option .alarm-id {
  font-size: 12px;
  color: #909399;
}

/* 提示框样式优化 */
.el-alert {
  margin-top: 10px;
}

.el-alert .el-alert__description {
  font-size: 13px;
  line-height: 1.4;
}
</style>
